<?
$auth = Zend_Auth::getInstance();
?>
<? if ($auth->hasIdentity()): ?>
<div id="login"><a href="/index/logout">Logout</a> </div>
<? else: ?>
<div id="login"><a href="#" id="loginus">Log In</a> <br> <a id="joinus" href="#">Join for free</a></div>
<? endif; ?>
<img src="/pictures/Pirate Skull.jpg" width="22%">

<div id="right-img">
    <?= $this->regForm ?>
    <?= $this->loginForm ?>
</div>


<div id="navright">
    <a href="/index/treasuremap">Treasure Maps</a><br>
    <a href="/index/discover">Discover Treasures</a><br>
    <a href="/index/report" onclick="alert('in work');return false;">Report a Trove</a>
</div>

<script type="text/javascript">

    $('#joinus').click(function() {
        hideAll();
        $('#forma').toggle();
        return false;
    });
    $('#loginus').click(function() {
        hideAll();
        $('#forma_login').toggle();
        return false;
    });

    function hideAll() {
        $('#forma_login').css('display', 'none');
        $('#forma').css('display', 'none');
    }
</script>